package computerStore;

public class Computer {
	public CPU cpu;
	public Memory memory;
	public Hardpan hardpan;
	public Board board;
	public String comName;
	public int totalPrice;
	
	public Computer(CPU cpu,Memory memory,Hardpan hardpan,Board board,
			String comName,int totalPrice) {
		this.cpu = cpu;
		this.memory = memory;
		this.hardpan = hardpan;
		this.board = board;
		this.comName = comName;
		this.totalPrice = totalPrice;
	}
	
	public void display() {
		System.out.println("CPU: " + cpu.Name + " " + cpu.coreNum + "核   " + cpu.price+"元");
		System.out.println("Memory: " + memory.Name + " " + memory.volume + "GB " + memory.price+"元");
		System.out.println("Hardpan: " + hardpan.Name + " " + hardpan.volume + "GB " + hardpan.price+"元");
		System.out.println("Board: " + board.Name + " " + board.speed + "M/S " + board.price+"元");
		System.out.println("comName: " + comName );
		System.out.println("totalPrice: " + totalPrice +"元");
		System.out.println("CPUWork: " + cpu.cpuWork() );
		System.out.println("MemoryWork: " + memory.memWork());
		System.out.println("HardpanWork : " + hardpan.hardWork() );
		System.out.println("BoardWork: " + board.boardWork() );
		System.out.println();
	}
	
}
